import { connect } from 'react-redux';
import { JsonForms } from '@jsonforms/react';
import React, { PureComponent } from 'react';
import './App.css';
import { init } from './actions/init';

class App extends PureComponent {
  componentDidMount() {
    const { dispatch } = this.props;
    init().then(data => dispatch(data));
    // dispatch(init);
  }

  render() {
    return (
      <JsonForms />
    );
  }
}

export default connect()(App);
